package com.fjjn.service.impl;

import com.fjjn.service.PayService;
import com.fjjn.service.RedisDelayQueueCallbackService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

@Slf4j
@Service("payService")
public class PayServiceImpl implements PayService, RedisDelayQueueCallbackService<Long> {
    @Override
    public void pay() {
        log.info("支付啦");
    }

    @Override
    public void callback(Long aLong) {
        log.info("payService开始执行啦，订单id:{}",aLong);
        try {
            Thread.sleep(2000);
        } catch (InterruptedException e) {
            throw new RuntimeException(e);
        }
    }
}
